package com.mathdroid.model.abilities.specs.sniper;

import com.mathdroid.model.abilities.Ability;
import com.mathdroid.model.enums.EDmgType;

public final class ShatterShot extends Ability {

	/**
	 * Generated UID.
	 */
	private static final long serialVersionUID = -2831173202568928293L;

	public ShatterShot() {
		this.setName("Shatter Shot");
		this.setIconName("perforatingshot");
		this.setResource("Energy");
		this.setCost(10d);
		this.setDescription(
				"Fires a high-impact shot that deals 499 - 555 weapon " +
				"damage and reduces the target's armor by 20% for 45 seconds.");
		this.setCooldownMs(4500d);
		this.setDirectDamageType(EDmgType.ENERGY);
		
		this.setStandardHealthPercentMax(0.056);
		this.setStandardHealthPercentMin(0.056);	
		this.setAmountModifierPercent(-0.62);
		this.setCoefficient(0.56);
		
		this.setTrainableLevel(28);
	}
	
	@Override
	public String getDescription() {
		return "Fires a high-impact shot that deals " + this.getMinDirect() 
			+ " - " + this.getMaxDirect() + " weapon " +
			"damage and reduces the target's armor by 20% for 45 seconds.";
	}

	@Override
	public double getMinPeriodic() {
		return 0d;
	}

	@Override
	public double getMaxPeriodic() {
		return 0d;
	}

	@Override
	public double getMinDirect() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMin()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMin() 
			* this.getStdDmg();
	}

	@Override
	public double getMaxDirect() {
		return 
			this.getAmountModifierPercent()
			* this.getCharStats().getRangedDamagePrimaryMax()
			
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
			
			+ this.getStandardHealthPercentMax() 
			* this.getStdDmg();
	}

}
